package Exception.A;

public class D {

public class Exception_Sample_4 {
    public static void devide(int j) throws ArrayIndexOutOfBoundsException,
            RuntimeException {
        int[] num = new int[5];
        int i = 0;
        while (i < 6) {
            j = j - 1;
            num[i] = i;
            System.out.print(num[i] + "/" + j + "=");
            System.out.println(num[i] / j);
            i++;
        }
    }
    public static void main(String args[]) {
        System.out.println("ok");
        try {
            devide(3);
        } catch (ArrayIndexOutOfBoundsException e) {
            System.out.println();
        } catch (RuntimeException e) {
            System.out.println();
        }
    }
}
}
